package com.design_patterns.state;

/**
 * @author: 李德才
 * @description:
 * @create: 2020-09-20 15:32
 **/
public class SmoothChangeState extends PowerSourceState {

    public SmoothChangeState() {
        this.flag = !this.flag;
    }

    @Override
    void on() {
        System.err.println("先检查设备");
        System.err.println("打开电源");
    }

    @Override
    void off() {
        System.err.println("先关闭软件");
        System.err.println("关闭访问");
        System.err.println("等待当前请求执行完毕");
        System.err.println("关闭电源");
    }


}